import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

path = '/var/asuspei/my_svn/c_darknet/darknet-debug-cpu/rand_normal_check.5000.tmp.txt'

vals = []
with open(path, 'r') as f:
    for val in f.readlines():
        val = val[:-1]
        # print(f'|{val}|')
        vals.append(float(val))

vals = np.array(vals, dtype=float);

vals_s = pd.Series(vals)
print(vals_s.describe())

# bins 区间个数
# kde 是否显示密度曲线
# vertical 是否竖直方向
sns.distplot(vals,
             bins=100,
             kde=True,
             vertical=False,
             color='r',
             )
plt.show()
